﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/admin/AdminMaster.master" ValidateRequest="false" CodeFile="WantMeetAdm.aspx.cs" Inherits="admin_WantMeetAdm" %>

<%@ Register Assembly="DotNetTextBox" Namespace="DotNetTextBox" TagPrefix="DNTB" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="AdminRight">
    <div class="rightHeader1">
        <div class="rightHLeft"><span class="rightHeaderTitle">当前位置</span></div>
        <div class="rightHMiddle2">
            <span>
                <a href="Default.aspx" class="moreRight" style="float: left;">首页</a> <span class="jian">></span>
                <a href="WantMeetAdm.aspx" class="moreRight" style="float: left;">招聘会信息</a>
            </span>
        </div>
        <div class="rightHRight"></div>
    </div>
    <div style="margin-top: 10px; border: 1px solid #dddddd; width: 766px;">
        <div style="width: 740px; margin-left: 20px; margin-top: 5px;">
            <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True"
                AutoGenerateRows="False" BackColor="White" BorderColor="#CC9966"
                BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="wmiid"
                DataSourceID="SqlDataSource2" Height="50px" HorizontalAlign="Left"
                Width="722px" OnDataBound="DetailsView1_DataBound" GridLines="both"
                OnLoad="DetailsView1_Load">
                <FooterStyle BackColor="#1f93e0" ForeColor="#333333" />
                <RowStyle BackColor="White" ForeColor="#333333" />
                <PagerStyle BackColor="#1f93e0" ForeColor="#FFFFFF" HorizontalAlign="Center" />
                <Fields>
                    <asp:TemplateField HeaderText="招聘会名称" SortExpression="wmititle">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("wmititle") %>'></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                ControlToValidate="TextBox1" ErrorMessage="*"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                        <InsertItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("wmititle") %>'></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                                ControlToValidate="TextBox1" ErrorMessage="*"></asp:RequiredFieldValidator>
                        </InsertItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("wmititle") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="wmiadd" HeaderText="举 办 城 市" SortExpression="wmiadd" />
                    <asp:TemplateField HeaderText="招聘会场地" SortExpression="wmid">
                        <EditItemTemplate>
                            <asp:DropDownList ID="DropDownList1" runat="server"
                                DataSourceID="SqlDataSource1" DataTextField="wmname" DataValueField="wmid"
                                SelectedValue='<%# Bind("wmid") %>'>
                            </asp:DropDownList>
                        </EditItemTemplate>
                        <InsertItemTemplate>
                            <asp:DropDownList ID="DropDownList1" runat="server"
                                DataSourceID="SqlDataSource1" DataTextField="wmname" DataValueField="wmid"
                                SelectedValue='<%# Bind("wmid") %>'>
                            </asp:DropDownList>
                        </InsertItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("wmname") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="详 细 信 息" SortExpression="wmiinfo">
                        <EditItemTemplate>
                            <DNTB:WebEditor ID="WebEditor1" runat="server" AdjustSize="50"
                                BackColor="White" BorderColor="#DDDDDD" BorderWidth="0px"
                                CodeBackColor="#E8F4FF" CodeBorder="1px" CodeBorderColor="#6595D6"
                                CodeBorderStyle="Dotted" CodeTitle="以下是代码片段：" EditBorderColor="#CDCDD3"
                                EditHeight="210px" Height="280px" LeftAreaAlign="center" LeftAreaWidth="36%"
                                QuoteBackColor="#E8F4FF" QuoteBorder="1px" QuoteBorderColor="#6595D6"
                                QuoteBorderStyle="Dotted" QuoteTitle="以下是引用片段：" RightAreaAlign="center"
                                RightAreaWidth="64%" Shadow="False" StatusHeight="20px"
                                systemFolder="system_dntb/" Text='<%# Bind("wmiinfo") %>'
                                ToolBarColor="#EFEFEF" ToolBarHeight="50px" Width="555px" />
                        </EditItemTemplate>
                        <InsertItemTemplate>
                            <DNTB:WebEditor ID="WebEditor2" runat="server" AdjustSize="50"
                                BackColor="White" BorderColor="#DDDDDD" BorderWidth="0px"
                                CodeBackColor="#E8F4FF" CodeBorder="1px" CodeBorderColor="#6595D6"
                                CodeBorderStyle="Dotted" CodeTitle="以下是代码片段：" EditBorderColor="#CDCDD3"
                                EditHeight="210px" Height="280px" LeftAreaAlign="center" LeftAreaWidth="36%"
                                QuoteBackColor="#E8F4FF" QuoteBorder="1px" QuoteBorderColor="#6595D6"
                                QuoteBorderStyle="Dotted" QuoteTitle="以下是引用片段：" RightAreaAlign="center"
                                RightAreaWidth="64%" Shadow="False" StatusHeight="20px"
                                systemFolder="system_dntb/" Text='<%# Bind("wmiinfo") %>'
                                ToolBarColor="#EFEFEF" ToolBarHeight="50px" Width="555px" />
                        </InsertItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("wmiinfo") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="举 办 日 期" SortExpression="wmidate">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox4" runat="server"
                                Text='<%# Bind("wmidate", "{0:d}") %>'></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                                ControlToValidate="TextBox4" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                ControlToValidate="TextBox4" ErrorMessage="日期格式（yyyy/mm/dd）"
                                ValidationExpression="\d{4}/\d{2}/\d{2}"></asp:RegularExpressionValidator>
                        </EditItemTemplate>
                        <InsertItemTemplate>
                            <asp:TextBox ID="TextBox4" runat="server"
                                Text='<%# Bind("wmidate", "{0:d}") %>'></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
                                ControlToValidate="TextBox4" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                ControlToValidate="TextBox4" ErrorMessage="日期格式（yyyy/mm/dd）"
                                ValidationExpression="\d{4}/\d{2}/\d{2}"></asp:RegularExpressionValidator>
                        </InsertItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server" Text='<%# Bind("wmidate", "{0:d}") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True"
                                CommandName="Update" Text="更新"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"
                                CommandName="Cancel" Text="取消"></asp:LinkButton>
                        </EditItemTemplate>
                        <InsertItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True"
                                CommandName="Insert" Text="添加"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"
                                Text="浏览" CommandArgument="Cancel"></asp:LinkButton>
                        </InsertItemTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server"
                                NavigateUrl="~/admin/addWantMeet.aspx">添加</asp:HyperLink>&nbsp;&nbsp;
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
                                CommandName="Edit" Text="编辑"></asp:LinkButton>
                            &nbsp;&nbsp;<asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False"
                                CommandName="Delete" Text="删除"
                                OnClientClick="return confirm(&quot;确定删除？&quot;);"></asp:LinkButton>
                            
                        </ItemTemplate>
                    </asp:TemplateField>
                </Fields>
                <HeaderStyle BackColor="#1f93e0" Font-Bold="True" ForeColor="#FFFFFF" />
                <HeaderTemplate>
                    招聘会信息
                </HeaderTemplate>
                <EditRowStyle BackColor="#FFFFFF" Font-Bold="True" ForeColor="#333333" />
            </asp:DetailsView>
        </div>
        <div style="height: auto; overflow: hidden; clear: both; margin-left: 20px; padding-top: 10px;">
            <div style="float: left;">
                <asp:FormView ID="FormView1" runat="server" CellPadding="4" DataKeyNames="wmid" BorderWidth="1px"  Width="300px"
                    DataSourceID="SqlDataSource1" DefaultMode="Insert" ForeColor="#333333" Height="60px">
                    <FooterStyle BackColor="#1f93e0" ForeColor="#333333" />
                    <RowStyle BackColor="White" ForeColor="#333333" />
                    <EditItemTemplate>
                        wmid:
                <asp:Label ID="wmidLabel1" runat="server" Text='<%# Eval("wmid") %>' />
                        <br />
                        wmname:
                <asp:TextBox ID="wmnameTextBox" runat="server" Text='<%# Bind("wmname") %>' />
                        <br />
                        <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
                            CommandName="Update" Text="更新" />
                        &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"
                            CausesValidation="False" CommandName="Cancel" Text="取消" />
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        招聘会场地:
                <asp:TextBox ID="wmnameTextBox" runat="server" Text='<%# Bind("wmname") %>' />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
                            ControlToValidate="wmnameTextBox" ErrorMessage="*" ValidationGroup="1"></asp:RequiredFieldValidator>
                        <br />
                        <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
                            CommandName="Insert" Text="添加" ValidationGroup="1" />
                        &nbsp;
                    </InsertItemTemplate>
                    <ItemTemplate>
                        wmid:
                <asp:Label ID="wmidLabel" runat="server" Text='<%# Eval("wmid") %>' />
                        <br />
                        wmname:
                <asp:Label ID="wmnameLabel" runat="server" Text='<%# Bind("wmname") %>' />
                        <br />
                        <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
                            CommandName="Edit" Text="编辑" />
                        &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
                            CommandName="Delete" Text="删除" />
                        &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
                            CommandName="New" Text="新建" />
                    </ItemTemplate>
                    <PagerStyle BackColor="#1f93e0" ForeColor="#FFFFFF" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#1f93e0" Font-Bold="True" ForeColor="#FFFFFF" />
                    <HeaderTemplate>
                        招聘会名称
                    </HeaderTemplate>
                </asp:FormView>
            </div>
            <div style="float: left; margin-left: 30px;">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" GridLines="none"  Width="300px"
                    AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="wmid" BorderWidth="1px"
                    DataSourceID="SqlDataSource3" OnRowDeleting="GridView1_RowDeleting" PageSize="5">
                    <FooterStyle BackColor="#1f93e0" ForeColor="#333333" />
                    <RowStyle BackColor="White" ForeColor="#333333" />
                    <PagerStyle BackColor="#1f93e0" ForeColor="#FFFFFF" HorizontalAlign="Center" />
                    <Columns>
                        <asp:BoundField DataField="wmname" HeaderText="招聘会场地" SortExpression="wmname" />
                        <asp:TemplateField ShowHeader="False">
                            <EditItemTemplate>
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True"
                                    CommandName="Update" Text="更新"></asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"
                                    CommandName="Cancel" Text="取消"></asp:LinkButton>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
                                    CommandName="Edit" Text="编辑"></asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"
                                    CommandName="Delete" OnClientClick="return window.confirm(&quot;确定删除！&quot;);"
                                    Text="删除"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#1f93e0" Font-Bold="True" ForeColor="#FFFFFF" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </div>
        </div>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [WantMeetClass] WHERE [wmid] = @original_wmid AND [wmname] = @original_wmname"
        InsertCommand="INSERT INTO [WantMeetClass] ([wmname]) VALUES (@wmname)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT * FROM [WantMeetClass]"
        UpdateCommand="UPDATE [WantMeetClass] SET [wmname] = @wmname WHERE [wmid] = @original_wmid AND [wmname] = @original_wmname">
        <DeleteParameters>
            <asp:Parameter Name="original_wmid" Type="Int32" />
            <asp:Parameter Name="original_wmname" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="wmname" Type="String" />
            <asp:Parameter Name="original_wmid" Type="Int32" />
            <asp:Parameter Name="original_wmname" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="wmname" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [WantMeetInfo] WHERE [wmiid] = @original_wmiid"
        InsertCommand="INSERT INTO [WantMeetInfo] ([wmititle], [wmiadd], [wmid], [wmiinfo], [wmidate]) VALUES (@wmititle, @wmiadd, @wmid, @wmiinfo, @wmidate)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT WantMeetInfo.wmiid, WantMeetInfo.wmititle, WantMeetInfo.wmiadd, WantMeetInfo.wmid, WantMeetInfo.wmiinfo, WantMeetInfo.wmidate, WantMeetClass.wmname FROM WantMeetInfo INNER JOIN WantMeetClass ON WantMeetInfo.wmid = WantMeetClass.wmid"
        UpdateCommand="UPDATE [WantMeetInfo] SET [wmititle] = @wmititle, [wmiadd] = @wmiadd, [wmid] = @wmid, [wmiinfo] = @wmiinfo, [wmidate] = @wmidate WHERE [wmiid] = @original_wmiid">
        <DeleteParameters>
            <asp:Parameter Name="original_wmiid" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="wmititle" Type="String" />
            <asp:Parameter Name="wmiadd" Type="String" />
            <asp:Parameter Name="wmid" Type="Int32" />
            <asp:Parameter Name="wmiinfo" Type="String" />
            <asp:Parameter Name="wmidate" Type="DateTime" />
            <asp:Parameter Name="original_wmiid" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="wmititle" Type="String" />
            <asp:Parameter Name="wmiadd" Type="String" />
            <asp:Parameter Name="wmid" Type="Int32" />
            <asp:Parameter Name="wmiinfo" Type="String" />
            <asp:Parameter Name="wmidate" Type="DateTime" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [WantMeetClass] WHERE [wmid] = @original_wmid AND [wmname] = @original_wmname"
        InsertCommand="INSERT INTO [WantMeetClass] ([wmname]) VALUES (@wmname)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT * FROM [WantMeetClass]"
        UpdateCommand="UPDATE [WantMeetClass] SET [wmname] = @wmname WHERE [wmid] = @original_wmid AND [wmname] = @original_wmname">
        <DeleteParameters>
            <asp:Parameter Name="original_wmid" Type="Int32" />
            <asp:Parameter Name="original_wmname" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="wmname" Type="String" />
            <asp:Parameter Name="original_wmid" Type="Int32" />
            <asp:Parameter Name="original_wmname" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="wmname" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        InsertCommand="INSERT INTO [WantMeetInfo] ([wmititle], [wmiadd], [wmid], [wmiinfo], [wmidate]) VALUES (@wmititle, @wmiadd, @wmid, @wmiinfo, @wmidate)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT * FROM [WantMeetInfo]"
        UpdateCommand="UPDATE [WantMeetInfo] SET [wmititle] = @wmititle, [wmiadd] = @wmiadd, [wmid] = @wmid, [wmiinfo] = @wmiinfo, [wmidate] = @wmidate WHERE [wmiid] = @original_wmiid AND [wmititle] = @original_wmititle AND [wmiadd] = @original_wmiadd AND [wmid] = @original_wmid AND [wmiinfo] = @original_wmiinfo AND [wmidate] = @original_wmidate">
        <UpdateParameters>
            <asp:Parameter Name="wmititle" Type="String" />
            <asp:Parameter Name="wmiadd" Type="String" />
            <asp:Parameter Name="wmid" Type="Int32" />
            <asp:Parameter Name="wmiinfo" Type="String" />
            <asp:Parameter Name="wmidate" Type="DateTime" />
            <asp:Parameter Name="original_wmiid" Type="Int32" />
            <asp:Parameter Name="original_wmititle" Type="String" />
            <asp:Parameter Name="original_wmiadd" Type="String" />
            <asp:Parameter Name="original_wmid" Type="Int32" />
            <asp:Parameter Name="original_wmiinfo" Type="String" />
            <asp:Parameter Name="original_wmidate" Type="DateTime" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="wmititle" Type="String" />
            <asp:Parameter Name="wmiadd" Type="String" />
            <asp:Parameter Name="wmid" Type="Int32" />
            <asp:Parameter Name="wmiinfo" Type="String" />
            <asp:Parameter Name="wmidate" Type="DateTime" />
        </InsertParameters>
    </asp:SqlDataSource>
</asp:Content>
